#pragma once
#include "WPModel.h"

class CUnitListUI;
class CWordPracticeWnd : public WindowImplBase, public IWPViewModel
{
public:
    CWordPracticeWnd(void);
    ~CWordPracticeWnd(void);

    LPCTSTR GetWindowClassName() const;	
    virtual void OnFinalMessage(HWND hWnd);
    virtual void Notify(TNotifyUI& msg);
    virtual void InitWindow();
    virtual void OnClick(TNotifyUI& msg);
    virtual LRESULT ResponseDefaultKeyEvent(WPARAM wParam);
    virtual UILIB_RESOURCETYPE GetResourceType() const;
    virtual CDuiString GetSkinFile();
    virtual CDuiString GetSkinFolder();
    virtual CControlUI* CreateControl(LPCTSTR pstrClass);
    virtual LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
    virtual LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
    virtual LRESULT HandleCustomMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
    //virtual LPCTSTR GetResourceID() const;

    

public:
    void UpdateMaterialsView(LPCTSTR lpszName);

    void UpdateGradesView(LPCTSTR lpszName);

    void UpdateUnitsView(LPCTSTR lpszName);

    void SetPracticeModel(CWPModel* pWPModel);

    void SetOptionUI(LPCTSTR lpOptName, LPCTSTR lpGroupName);

protected:
    void OnLevelClick(TNotifyUI& msg);

private:
    CButtonUI* m_pCloseBtn;
    CButtonUI* m_pHelpBtn;
    CButtonUI* m_pMinBtn;
    CUnitListUI* m_pUnitList;
    CListUI* m_pTeachingMaterialList;
    CListUI* m_pGradeList;
    CCheckBoxUI* m_pTeachingMaterialCkb;
    CWPModel* m_pWPModel;

    BOOL m_bInitView;

    int m_nTagSwitch;


};
